package cn.wbnull.springbootconsumer.config;

import cn.wbnull.springbootconsumer.config.loadbalancer.GlobalRule;
import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 负载均衡策略配置类
 *
 * @author dukunbiao(null)  2019-04-24
 *         https://github.com/dkbnull/SpringCloudDemo
 */
@Configuration
public class LoadBalanced {

    @Bean
    public IRule iRule() {
        return new GlobalRule();
        //return new WeightedResponseTimeRule();
        //return new RandomRule();
    }
}
